package com.example.shuiyin.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Map;

@Data
@Component
@ConfigurationProperties(prefix = "minio")
public class MinioProperties {
    
    private String endpoint;
    private String accessKey;
    private String secretKey;
    private String bucketName;
    private boolean secure = false;
    private Map<String, String> buckets;
    private int connectTimeout;
    private int readTimeout;
    private int writeTimeout;
    private boolean enabled = true;
    
    public String getEndpoint() {
        return endpoint;
    }
    
    public String getAccessKey() {
        return accessKey;
    }
    
    public String getSecretKey() {
        return secretKey;
    }
    
    public String getBucketName() {
        return bucketName;
    }
    
    public boolean isEnabled() {
        return enabled;
    }
    
    public boolean isSecure() {
        return secure;
    }
    
    /**
     * 获取默认存储桶名称
     * @return 默认存储桶名称
     */
    public String getBucket() {
        return this.bucketName;
    }
} 